﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Server.Repo;
using Server.Model;
using Server.Model.Interfaces;

namespace Client.Controllers
{
    public class HomeController : Controller
    {
        //
        // GET: /Home/

        private Ispt_valuesRepository _spt_valuesRepository;
        private Ispt_monitorRepository _monitorRepo;

        public HomeController(Ispt_valuesRepository spt_valuesRepo, Ispt_monitorRepository monitorRepo)
        {
            _spt_valuesRepository = spt_valuesRepo;
            _monitorRepo = monitorRepo;
        }

        public ActionResult Index()
        {


            var eResult = _monitorRepo.GetAll();
            var data = _spt_valuesRepository.GetAll();

            //var r = d.GetAllManually().ToList();
            // d.Add(new spt_values() { name="test"});


            foreach (var item in eResult)
            {
                var j = item.lastrun;
            }

            return View();
        }

    }
}
